import { createRouter, createWebHistory } from 'vue-router';

import appUpdaterRouter from '@/features/app-updater/router';
import homeRouter from '@/features/home/router';
import splashRouter from '@/features/splash/router';

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    ...appUpdaterRouter,
    ...homeRouter,
    ...splashRouter,
    {
      path: '',
      redirect: '/splash',
    },
    {
      path: '/:pathMatch(.*)*',
      component: () => import('@/shared/components/NotFound.vue'),
    },
  ],
});

export default router;
